class Jisqi():
    # print("jisuanqi")
    # 实例即调用
    # def __init__(self,n:
    #     print(n)
    #     # print("jisuanqi")

    def jiA(self, a, b):
        # c=a+b
        if isinstance(a, (int, float)) and isinstance(b, (int, float)):
            c = a + b
            return round(c,2)
        elif a is None or a == '':
            return "输入第一个数不能为空"
        elif b is None or b == '':
            return "输入第二个数不能为空"
        else:
            return "无效输出"

    def jiAN(self, a, b):
        # c = a - b
        if isinstance(a,(int,float)) and isinstance(b,(int,float)):
            c=a-b
            return round(c,2)
        elif a is None or a=='':
            return "输入第一个数不能是空"
        elif b is None or b=='':
            return "输入第二个数不能是空"
        else:
            return "无效输出"

    def chFA(self, a, b):
        if isinstance(a,(int,float)) and isinstance(b,(int,float)):
            c = a * b
            return round(c,2)
        elif a is None or a=='':
            return "输入第一个数不能为空"
        elif b is None or b=='':
            return "输入第二个数不能为空"
        else:
            return "无效输出"

    def chuFA(self, a, b):
        if b!=0:
            if isinstance(a,(int,float)) and isinstance(b,(int,float)):
                c = a / b
                return round(c,2)
            elif a is None or a == '':
                return "输入第一个数不能为空"
            elif b is None or b == '':
                return "输入第二个数不能为空"
            # elif b ==0:
            #     return "无效输出"
            else:
                return "无效输出"
        else:
            return "无效输出"
if __name__ == '__main__':

    d = Jisqi()
    # print(d.jiA(1, 0))
    # print(d.jiAN(-10, -20))
    # print(d.chFA(3.7, 2.6))
    # print(d.chuFA(99, 9))

